package com.smcdd.cdb.dbo.cdb_dbo.ui.activity;

import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.widget.ImageView;

import com.smcdd.cdb.dbo.cdb_dbo.R;
import com.smcdd.cdb.dbo.cdb_dbo.service.presenter.SelectShopPresenter;
import com.smcdd.cdb.dbo.cdb_dbo.service.view.ISelectShopAc;
import com.smcdd.cdb.dbo.cdb_dbo.ui.base.BaseActivity;
import com.smcdd.cdb.dbo.cdb_dbo.ui.utils.ObtainUdis;

/**
 * 作者：Administrator on 2017/7/1 12:11
 * 邮箱：zhanghuaiha@gmail.com
 *  门店历史数据
 */

public class SelectShopActivity extends BaseActivity<ISelectShopAc,SelectShopPresenter> implements ISelectShopAc{
    private ImageView sl_back;
    private RecyclerView sl_recycler;

    @Override
    public void initView() {
        sl_back = (ImageView) findViewById(R.id.sl_back);
        sl_recycler = (RecyclerView) findViewById(R.id.sl_recycler);

    }

    @Override
    public void initData() {
        sl_recycler.setLayoutManager(new LinearLayoutManager(this));
        String udid = ObtainUdis.getUDID(SelectShopActivity.class);
        mPresenter.loadContacts(udid);
    }

    @Override
    public void initListener() {
        sl_back.setOnClickListener(v -> finish());
    }

    @Override
    protected SelectShopPresenter createPresenter() {
        return new SelectShopPresenter(this);
    }

    @Override
    protected int provideContentViewId() {
        return R.layout.activity_select;
    }

    @Override
    public RecyclerView getRv() {
        return sl_recycler;
    }

    @Override
    public SelectShopActivity getAc() {
        return SelectShopActivity.this;
    }
}
